home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Magazine 28 Bonus
/
CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin
/
data
/
crmixpl.dir
/
00084_Script_INITIALIZE COLOR WHEEL
< prev
next >
Wrap
Text File
|
1996-05-07
|
7KB
|
210 lines
-- ---------------------------------------------------------------
-- DISCUSSION OF GAME
-- the color wheel game allows the user to mix colors and
-- create the color wheel. The user can mix only the
-- primary colors to make other colors (hence the finger
-- cursor is used only for the primary colors and for
-- the clear button). Colors are chosen randomly from
-- a global variable possibleColorsList which is a
-- property list whose properties are colors and whose
-- values are the pallete numbers of the colors. As
-- the user mixes the primary colors to make a new
-- color, the new color is removed from the possibleColorsList
-- and any new colros the user can now make are added to
-- possibleColorsList. Each color is defined by the parts
-- of blue, yellow, and red used to make the color and are
-- all of the form: BxRzYw where x,z and w are the parts
-- of blue, red and yellow respectively used to make the
-- given color.
-- WARNING: because possibleColorsList is a property
-- list, no two colors can have the same pallete color.
-- If two colors have the same pallete number, the wrong
-- one may be deleted from the possibleColorsList and then
-- the user will not be able to create that color and
-- complete the color wheel.
-- ---------------------------------------------------------------
-- ---------------------------------------------------------------
-- Handler initializeColorWheelGame
on initializeColorWheelGame
defineCursors
setColorWheelGlobals
setColorWheelPuppets
setColorWheelVisibles
setColorWheelCursors
-- possibleColorsList is a property list where the name of each
-- property is a color and the value of each property is the pallete
-- number of the color.
global possibleColorsList
-- start out making green, orange, or purple
set possibleColorsList = ["B1R0Y1":227, "B1R1Y0":140, "B0R1Y1":23]
puppetSound "StartGame"
upDateStage
end
-- ---------------------------------------------------------------
-- Handler setColorWheelGlobals
on setColorWheelGlobals
-- set sprites
global yellowSprite, redSprite, blueSprite
global B0R1Y1Sprite, B1R0Y1Sprite, B1R1Y0Sprite, -- orange, green and purple
global B0R1Y2Sprite, B0R2Y1Sprite -- yellowOrange and redOrange
global B1R0Y2Sprite, B2R0Y1Sprite -- yellowGreen and blueGreen
global B1R2Y0Sprite, B2R1Y0Sprite -- redPurple and bluePurple
global B1R0Y3Sprite, B0R1Y3Sprite, B0R2Y3Sprite, B0R3Y2Sprite
global B0R3Y1Sprite, B1R3Y0Sprite, B2R0Y3Sprite, B2R3Y0Sprite
global B3R0Y2Sprite, B3R0Y1Sprite, B3R1Y0Sprite, B3R2Y0Sprite
global clearSprite, answerSprite, guessSprite
global tooManySprite
set B1R0Y3Sprite = 11
set B0R1Y3Sprite = 12
set B0R2Y3Sprite = 13
set B0R3Y2Sprite = 14
set B0R3Y1Sprite = 15
set B1R3Y0Sprite = 16
set B2R0Y3Sprite = 17
set B2R3Y0Sprite = 18
set B3R0Y2Sprite = 19
set B3R0Y1Sprite = 20
set B3R1Y0Sprite = 21
set B3R2Y0Sprite = 22
set B0R1Y2Sprite = 23
set B0R2Y1Sprite = 24
set B1R0Y2Sprite = 25
set B2R0Y1Sprite = 26
set B2R1Y0Sprite = 27
set B1R2Y0Sprite = 28
set B0R1Y1Sprite = 29 -- orange
set B1R0Y1Sprite = 30 -- green
set B1R1Y0Sprite = 31 -- purple
set yellowSprite = 32
set blueSprite = 33
set redSprite = 34
set guessSprite = 10
set answerSprite = 9
set clearSprite = 4
set tooManySprite = 35
-- the locH and locV of the "you have used too many..." warnings
global tooManyH, tooManyV
set tooManyH = 265
set tooManyV = 82
-- set Cursors
setHandCursor(redSprite)
setHandCursor(blueSprite)
setHandCursor(yellowSprite)
setHandCursor(clearSprite)
-- set combination globals
global answerCombination
set answerCombination = "B0R0Y0" -- 0 blues, 0 reds, 0 yellows
-- set data globals
global palleteNumbers
put field "palleteNumbers" into palleteNumbers
-- set variables for number of each color used
global numBlue, numRed, numYellow
set numBlue = 0
set numRed = 0
set numYellow = 0
global numBSprite, numRSprite, numYSprite
set numBSprite = 6
set numRSprite = 7
set numYSprite = 8
end
-- ---------------------------------------------------------------
-- Handler setColorWheelPuppets
on setColorWheelPuppets
global answerSprite, guessSprite
global numBSprite, numRSprite, numYSprite
puppetSprite answerSprite, TRUE
puppetSprite guessSprite, TRUE
puppetSprite numBSprite, TRUE
puppetSprite numRSprite, TRUE
puppetSprite numYSprite, TRUE
end
-- ---------------------------------------------------------------
-- Handler setColorWheelVisibles
on setColorWheelVisibles
global yellowSprite, redSprite, blueSprite
global B0R1Y1Sprite, B1R0Y1Sprite, B1R1Y0Sprite, -- orange, green and purple
global B0R1Y2Sprite, B0R2Y1Sprite -- yellowOrange and redOrange
global B1R0Y2Sprite, B2R0Y1Sprite -- yellowGreen and blueGreen
global B1R2Y0Sprite, B2R1Y0Sprite -- redPurple and bluePurple
global B1R0Y3Sprite, B0R1Y3Sprite, B0R2Y3Sprite, B0R3Y2Sprite
global B0R3Y1Sprite, B1R3Y0Sprite, B2R0Y3Sprite, B2R3Y0Sprite
global B3R0Y2Sprite, B3R0Y1Sprite, B3R1Y0Sprite, B3R2Y0Sprite
global clearSprite, answerSprite, guessSprite
global numBSprite, numRSprite, numYSprite
set the visible of sprite 1 = TRUE
set the visible of sprite 2 = TRUE
set the visible of sprite 3 = TRUE
set the visible of sprite 5 = TRUE
set the visible of sprite yellowSprite = TRUE
set the visible of sprite redSprite = TRUE
set the visible of sprite blueSprite = TRUE
set the visible of sprite answerSprite = TRUE
set the visible of sprite guessSprite = TRUE
set the visible of sprite clearSprite = TRUE
set the visible of sprite numBSprite = TRUE
set the visible of sprite numRSprite = TRUE
set the visible of sprite numYSprite = TRUE
set the visible of sprite B1R0Y3Sprite = FALSE
set the visible of sprite B0R1Y3Sprite = FALSE
set the visible of sprite B0R2Y3Sprite = FALSE
set the visible of sprite B0R3Y2Sprite = FALSE
set the visible of sprite B0R3Y1Sprite = FALSE
set the visible of sprite B1R3Y0Sprite = FALSE
set the visible of sprite B2R0Y3Sprite = FALSE
set the visible of sprite B2R3Y0Sprite = FALSE
set the visible of sprite B3R0Y2Sprite = FALSE
set the visible of sprite B3R0Y1Sprite = FALSE
set the visible of sprite B3R1Y0Sprite = FALSE
set the visible of sprite B3R2Y0Sprite = FALSE
set the visible of sprite B0R1Y1Sprite = FALSE
set the visible of sprite B1R0Y1Sprite = FALSE
set the visible of sprite B1R1Y0Sprite = FALSE
set the visible of sprite B0R1Y2Sprite = FALSE
set the visible of sprite B0R2Y1Sprite = FALSE
set the visible of sprite B1R0Y2Sprite = FALSE
set the visible of sprite B2R0Y1Sprite = FALSE
set the visible of sprite B2R1Y0Sprite = FALSE
set the visible of sprite B1R2Y0Sprite = FALSE
end
-- ---------------------------------------------------------------
-- Handler setColorWheelCursors
on setColorWheelCursors
global yellowSprite, blueSprite, redSprite, fingerCursor
global clearSprite
set the cursor of sprite yellowSprite = fingerCursor
set the cursor of sprite blueSprite = fingerCursor
set the cursor of sprite redSprite = fingerCursor
set the cursor of sprite clearSprite = fingerCursor
end